package cn.dogger.easyboot.init.initEntity;

import cn.dogger.easyboot.init.annotation.InitField;
import cn.dogger.easyboot.init.annotation.InitTable;
import cn.dogger.easyboot.init.enums.FieldTypeEnums;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 菜单权限表
 *
 * @author dogger
 *  2022-07-27
 */
@Data
@InitTable(name = "sys_menu",remark = "菜单权限表")
public class SysMenu {

    @InitField(remark = "菜单ID",name = "menu_id",type = FieldTypeEnums.int_,keyFlag = true)
    private Long menuId;

    @InitField(remark = "菜单名称",name = "menu_name",fieldLength = 50)
    private String menuName;

    @InitField(remark = "父菜单ID",name = "parent_id",type = FieldTypeEnums.int_)
    private Long parentId;

    @InitField(remark = "显示顺序",name = "order_num",type = FieldTypeEnums.int_)
    private Integer orderNum;

    @InitField(remark = "路由地址",name = "path",fieldLength = 50)
    private String path;

    @InitField(remark = "组件路径",name = "component",fieldLength = 50)
    private String component;

    @InitField(remark = "路由参数",name = "query",fieldLength = 50)
    private String query;

    @InitField(remark = "是否为外链（0是 1否）",name = "is_frame",type = FieldTypeEnums.int_)
    private Integer isFrame;

    @InitField(remark = "是否缓存（0缓存 1不缓存）",name = "isCache",type = FieldTypeEnums.int_)
    private Integer isCache;

    @InitField(remark = "菜单类型（M目录 C菜单 F按钮）",name = "menuType",fieldLength = 50)
    private String menuType;

    @InitField(remark = "菜单状态（1显示 0隐藏）",name = "visible",fieldLength = 50)
    private String visible;

    @InitField(remark = "菜单状态（1正常 0停用）",name = "status",fieldLength = 50)
    @TableField(fill = FieldFill.INSERT)
    private String status;

    @InitField(remark = "权限标识",name = "perms",fieldLength = 50)
    private String perms;

    @InitField(remark = "菜单图标",name = "icon",fieldLength = 50)
    private String icon;

    @InitField(remark = "创建者",name = "create_by",fieldLength = 50)
    private String createBy;

    @InitField(remark = "创建时间",name = "create_time",type = FieldTypeEnums.datetime_)
    private LocalDateTime createTime;

    @InitField(remark = "更新者",name = "update_by",fieldLength = 50)
    private String updateBy;

    @InitField(remark = "更新时间",name = "update_time",type = FieldTypeEnums.datetime_)
    private LocalDateTime updateTime;

    @InitField(remark = "备注",name = "remark",fieldLength = 50)
    private String remark;

}